<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .h{
            font-size: 36px;
        }
        .b{
            font-weight: bolder;
        }
        .i{
            font-size: initial;
        }
        .u{
            text-decoration: underline;
        }
    </style>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="app">
        <!-- {类名：true 或 false} -->
    <p :class="{u:u,b:true,h:0}">这是一个段落</p>
    <!-- 数组:变量或常量的组合 -->
    <p :class="[h,b,'u']">这是一个段落</p>

    <p :class="[true?h:'u']">这是一个段落</p>
    <p :class="[{u:u},h]">这是一个段落</p>
   </div>
    <script>
        let vm = new Vue ({
            el: "#app",
            data: {
                u:false,
                h:"h",
                b:"b"

            }
        })
    </script>
</body>
</html>